import home from '../views/home'
import about from '../views/about'
import find from '../views/find'
import detail from '../views/detail'
import desc from '../views/desc'
import comments from '../views/comments'

const routes = [
    {
        path: "/home",
        component: home,
        name: 'home'
    },
    {
        path: '/about',
        component: about,
        name: 'about'
    },
    {
        path: '/find',
        component: find,
        name: 'find'
    },
    { 
        path: '/detail/:id', 
        component: detail, 
        name: 'detail',
        children: [
            {
                path: "",
                redirect: "desc"
            },
            {
                path: 'desc',
                component: desc
            },
             {
                path: 'comment',
                component: comments
            }
        ] 
    }
];

export default routes